<div class="userProducts form">
<?php echo $this->ExtendedForm->create('UserProduct', array('novalidate' => 'novalidate'));?>
	<h3><?php echo __d('admin', 'Add User Product'); ?></h3>
	<?php
		if(isset($this->request->params['named']['user_id'])) echo '<div style="display: none;">';
		echo $this->ExtendedForm->input('user_id', array_merge(array('label' => __d('admin', 'User')), array('options' => $usersSelect, 'empty' => '- ' . __d('admin', 'Choose a User') . ' -')));
		if(isset($this->request->params['named']['user_id'])) echo '</div>';

		if(isset($this->request->params['named']['product_id'])) echo '<div style="display: none;">';
		echo $this->ExtendedForm->input('product_id', array_merge(array('label' => __d('admin', 'Product')), array('options' => $productsSelect, 'empty' => '- ' . __d('admin', 'Choose a Product') . ' -')));
		if(isset($this->request->params['named']['product_id'])) echo '</div>';

		if(isset($this->request->params['named']['price_sugguest'])) echo '<div style="display: none;">';
		echo $this->ExtendedForm->input('price_sugguest', array_merge(array('label' => __d('admin', 'Price Sugguest'))));
		if(isset($this->request->params['named']['price_sugguest'])) echo '</div>';

		if(isset($this->request->params['named']['time_suggest'])) echo '<div style="display: none;">';
		echo $this->ExtendedForm->input('time_suggest', array_merge(array('label' => __d('admin', 'Time Suggest'))));
		if(isset($this->request->params['named']['time_suggest'])) echo '</div>';

		if(isset($this->request->params['named']['win'])) echo '<div style="display: none;">';
		echo $this->ExtendedForm->input('win', array_merge(array('label' => __d('admin', 'Win'))));
		if(isset($this->request->params['named']['win'])) echo '</div>';

		if(isset($this->request->params['named']['created_date'])) echo '<div style="display: none;">';
		echo $this->ExtendedForm->input('created_date', array_merge(array('label' => __d('admin', 'Created Date'))));
		if(isset($this->request->params['named']['created_date'])) echo '</div>';

	?>
<?php echo $this->ExtendedForm->end(array('label' => __d('admin', 'Save UserProduct'), 'class' => 'btn btn-primary', 'div' => false, 'before' => '<div class="form-group">', 'after' => "\n" . $this->Html->link(__d('admin', 'Cancel'), $redirectUrl, array('class' => 'btn btn-default')) . '</div>'));?>
</div>